
import java.util.Arrays;
import java.util.Random;
import java.util.Scanner;

public class Solution {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            int len = sc.nextInt();
            sc.nextLine();
            String[] s = sc.nextLine().trim().split(" ");
            int[] nums = new int[len];

            for (int i = 0; i < len; i++) {
                nums[i] = Integer.parseInt(s[i]);
            }
            System.out.println(Arrays.toString(sortArray(nums)));
            }


    }


    public static int[] sortArray ( int[] nums){
        int len = nums.length;
        quickSort(nums, 0, len - 1);
        return nums;
    }

    public static void quickSort ( int[] nums, int l, int r){
        if (l < r) {
            int a = partition(nums, l, r);
            quickSort(nums, l, a - 1);
            quickSort(nums, a + 1, l);
        }

    }

    public static int partition ( int[] nums, int l, int r){
        int pivot = new Random().nextInt(r - l + 1) + l; // 注意取随机数的方法：包不包括右端点 很重要
        swap(nums, pivot, r);
        int i = l - 1;
        for (int j = l; j < r; j++) {
            if (nums[j] <= nums[pivot]){
                i++;
                swap(nums, i, j);
            }


        }
        swap(nums, i+1, r);


        return i;
    }

    /*注意一下java中交换函数要这样写*/
    public static void swap ( int[] nums, int i, int j){
        int temp = nums[i];
        nums[i] = nums[j];
        nums[j] = temp;
    }


}
